package com.bluefuture.modules.app.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bluefuture.modules.app.entity.UserEntity;
import com.bluefuture.modules.app.form.LoginForm;
import com.bluefuture.modules.app.form.RegisterForm;
import com.bluefuture.modules.app.form.UpdateForm;
import com.bluefuture.modules.app.form.UserQueryParam;
import com.bluefuture.modules.app.vo.UserVO;

import java.util.List;

/**
 * 用户
 *
 * @author Mark sunlightcs@gmail.com
 */
public interface UserService extends IService<UserEntity> {

	UserEntity queryByMobile(String mobile);

	UserEntity queryByEmail(String email);

	UserVO register(RegisterForm registerForm);

	/**
	 * 用户登录
	 * @param form    登录表单
	 * @return        返回用户ID
	 */
	UserVO login(LoginForm form);

	UserVO update(UpdateForm form);

	void forgotPassword(String contact, String newPassword);

	Page<UserVO> userList(UserQueryParam param);

	List<UserEntity> allUsers();

	void updateUserToNormalUser(Long userId);

	List<UserVO> selectByIds(List<Integer> collectUserIds);
}
